/**
 * @note 用户信息 store 对象声明，需要 getter 再添加
 * */
const state = {
    userId: '', // 用户 id
    userName: '' // 用户名称
}

const mutations = {
    SET_USERNAME: (state, companyName) => {
        state.companyName = companyName
    },
    SET_USERID: (state, companyName) => {
        state.companyName = companyName
    }
}

const actions = {
    SAVE_USERINFO({commit}, data) {
        commit('SET_USERNAME', data.userId);
        commit('SET_USERID', data.userName);
    }
}



export default {
    namespaced: true,
    state,
    mutations,
    actions
}